import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Login from '@/views/Login.vue'
import Home from '@/views/home/home.vue'
import empty from '@/views/empty.vue'
import bigMap from '@/views/home/bigMap.vue'

//水源监测
import syjcIndex from '@/views/shuiyuan-jiance/sy-jc-index.vue'

//水厂监测
import scjcIndex from '@/views/shuichang-jiance/sc-jc-index.vue'

//供水泵站
import gsbzIndex from '@/views/gongshui-bengzhan/gs-bz-index.vue'

//供水管网
import gsgwIndex from '@/views/gongshui-guanwang/gs-gw-index.vue'
import gsgwDetails from '@/views/gongshui-guanwang/gs-gw-details.vue'

//大用户监测
import dyhjcIndex from '@/views/dayonghu-jiance/dyh-jc-index.vue'

//排水泵站
import psbzIndex from '@/views/paishui-bengzhan/ps-bz-index.vue'
import psbzDetails from '@/views/paishui-bengzhan/ps-bz-details.vue'

//排水管网
import psgwIndex from '@/views/paishui-guanwang/ps-gw-index.vue'

//污水厂监测
import wscjcIndex from '@/views/wushuichang-jiance/wsc-jc-index.vue'
import wscjcDetails from '@/views/wushuichang-jiance/wsc-jc-details.vue'


Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/home',
            name: 'home',
            component: Home
        },
        {
            path: '/shuiyuanjiance',
            name: 'empty',
            component: empty,
            redirect: '/shuiyuanjiance/index',
            children: [{
                path: 'index',
                name: '水源监测',
                component: syjcIndex,
            }]
        },
        {
            path: '/shuichangjiance',
            name: 'empty',
            component: empty,
            redirect: '/shuichangjiance/index',
            children: [{
                path: 'index',
                name: '水厂监测',
                component: scjcIndex,
            }]
        },
        {
            path: '/gongshuibengzhan',
            name: 'empty',
            component: empty,
            redirect: '/gongshuibengzhan/index',
            children: [{
                path: 'index',
                name: '供水泵站',
                component: gsbzIndex,
            }]
        },
        {
            path: '/gongshuiguanwang',
            name: 'empty',
            component: empty,
            redirect: '/gongshuiguanwang/index',
            children: [{
                    path: 'index',
                    name: '供水管网',
                    component: gsgwIndex,
                },
                {
                    path: 'details',
                    name: '供水管网详情',
                    component: gsgwDetails,
                }
            ]
        },
        {
            path: '/dayonghujiance',
            name: 'empty',
            component: empty,
            redirect: '/dayonghujiance/index',
            children: [{
                path: 'index',
                name: '大用户监测',
                component: dyhjcIndex,
            }]
        },
        {
            path: '/paishuibengzhan',
            name: 'empty',
            component: empty,
            redirect: '/paishuibengzhan/index',
            children: [{
                path: 'index',
                name: '排水泵站',
                component: psbzIndex,
            }, {
                path: 'details',
                name: '排水泵站',
                component: psbzDetails,
            }]
        },
        {
            path: '/paishuiguanwang',
            name: 'empty',
            component: empty,
            redirect: '/paishuiguanwang/index',
            children: [{
                path: 'index',
                name: '排水管网',
                component: psgwIndex,
            }]
        },
        {
            path: '/wushuichangjiance',
            name: 'empty',
            component: empty,
            redirect: '/wushuichangjiance/index',
            children: [{
                    path: 'index',
                    name: '污水厂监测',
                    component: wscjcIndex,
                },
                {
                    path: 'details',
                    name: '污水厂监测详情',
                    component: wscjcDetails,
                }
            ]
        },
        {
            path: '/bigmap',
            name: '地图',
            component: bigMap,
        }
    ]
})